﻿// -- MVC4WPF
// -- Copyright © 2009 Information Control Corporation
// -- Revision History:
// -- Version 0.9.0.0 First codeplex release  - Stephen Giffin

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVC4WPF.Automation;
using MVC4WPF.Automation.Dialog;

namespace MVC4WPF.Automation.VisualStudio.Dialog
{
    /// <summary>
    /// Property bag class that holds all the information used for the creation of a contract.
    /// </summary>
    public class ContractDialogPropertyBag : DialogBasePropertyBag
    {
        /// <summary>
        /// Constructor for the property bag. This constructor has no special logic on construction.
        /// </summary>
        public ContractDialogPropertyBag()
            : base()
        {
            //Intentinally Blank
        }

        #region Property - ContractType

        /// <summary>
        ///Constant that holds the name of the property 'ContractType'
        /// </summary>
        public const string PropertyNameContractType = "ContractType";

        /// <summary>
        ///Local variable for property ContractType
        /// </summary>
        private Data.MVCItemType _contractType;

        /// <summary>
        /// Enumeration that determines the type of MVC4WPF contract that is being created.
        /// </summary>
        /// <remarks>
        /// This property supports INotifyPropertyChanged and INotifyPropertyChanging
        /// </remarks>
        public Data.MVCItemType ContractType
        {
            get
            {
                return _contractType;
            }

            set
            {
                OnPropertyChanging(PropertyNameContractType);

                _contractType = value;

                OnPropertyChanged(PropertyNameContractType);
            }
        }

        #endregion Property - ContractType

        #region Property - PropertyBagsExist

        /// <summary>
        ///Constant that holds the name of the property 'PropertyBagsExist'
        /// </summary>
        public const string PropertyNamePropertyBagsExist = "PropertyBagsExist";

        /// <summary>
        ///Local variable for property PropertyBagsExist
        /// </summary>
        private bool _propertyBagsExist;

        /// <summary>
        /// Flag that determines if the visual studio project currently contains any property bags
        /// </summary>
        /// <remarks>
        /// This property supports INotifyPropertyChanged and INotifyPropertyChanging
        /// </remarks>
        public bool PropertyBagsExist
        {
            get
            {
                return _propertyBagsExist;
            }

            set
            {
                OnPropertyChanging(PropertyNamePropertyBagsExist);

                _propertyBagsExist = value;

                OnPropertyChanged(PropertyNamePropertyBagsExist);
            }
        }

        #endregion Property - PropertyBagsExist

        #region Property - ContractUsesPropertyBag

        /// <summary>
        ///Constant that holds the name of the property 'ContractUsesPropertyBag'
        /// </summary>
        public const string PropertyNameContractUsesPropertyBag = "ContractUsesPropertyBag";

        /// <summary>
        ///Local variable for property ContractUsesPropertyBag
        /// </summary>
        private bool _contractUsesPropertyBag;

        /// <summary>
        /// Flag that determines if this contract will use a property bag
        /// </summary>
        /// <remarks>
        /// This property supports INotifyPropertyChanged and INotifyPropertyChanging
        /// </remarks>
        public bool ContractUsesPropertyBag
        {
            get
            {
                return _contractUsesPropertyBag;
            }

            set
            {
                OnPropertyChanging(PropertyNameContractUsesPropertyBag);

                _contractUsesPropertyBag = value;

                OnPropertyChanged(PropertyNameContractUsesPropertyBag);
            }
        }

        #endregion Property - ContractUsesPropertyBag

        #region Property - SelectedPropertyBag

        /// <summary>
        ///Constant that holds the name of the property 'SelectedPropertyBag'
        /// </summary>
        public const string PropertyNameSelectedPropertyBag = "SelectedPropertyBag";

        /// <summary>
        ///Local variable for property SelectedPropertyBag
        /// </summary>
        private Data.PropertyBagDefinition _selectedPropertyBag;

        /// <summary>
        /// The propertybag definition that should be used with this contract.
        /// </summary>
        /// <remarks>
        /// This property supports INotifyPropertyChanged and INotifyPropertyChanging
        /// </remarks>
        public Data.PropertyBagDefinition SelectedPropertyBag
        {
            get
            {
                return _selectedPropertyBag;
            }

            set
            {
                OnPropertyChanging(PropertyNameSelectedPropertyBag);

                _selectedPropertyBag = value;

                OnPropertyChanged(PropertyNameSelectedPropertyBag);
            }
        }

        #endregion Property - SelectedPropertyBag

        #region Property - AvaliablePropertyBags

        /// <summary>
        ///Constant that holds the name of the property 'AvaliablePropertyBags'
        /// </summary>
        public const string PropertyNameAvaliablePropertyBags = "AvaliablePropertyBags";

        /// <summary>
        ///Local variable for property AvaliablePropertyBags
        /// </summary>
        private List<Data.PropertyBagDefinition> _avaliablePropertyBags;

        /// <summary>
        /// List of propertybags that can be selected for contract
        /// </summary>
        /// <remarks>
        /// This property supports INotifyPropertyChanged and INotifyPropertyChanging
        /// </remarks>
        public List<Data.PropertyBagDefinition> AvaliablePropertyBags
        {
            get
            {
                return _avaliablePropertyBags;
            }

            set
            {
                OnPropertyChanging(PropertyNameAvaliablePropertyBags);

                _avaliablePropertyBags = value;

                OnPropertyChanged(PropertyNameAvaliablePropertyBags);
            }
        }

        #endregion Property - AvaliablePropertyBags
    }
}
